﻿@model COM.DoorsWindows.Model.News

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>News</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Contents)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Contents)
            @Html.ValidationMessageFor(model => model.Contents)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.source)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.source)
            @Html.ValidationMessageFor(model => model.source)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreateTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreateTime)
            @Html.ValidationMessageFor(model => model.CreateTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Hits)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Hits)
            @Html.ValidationMessageFor(model => model.Hits)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsDelete)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsDelete)
            @Html.ValidationMessageFor(model => model.IsDelete)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.KeyWords)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.KeyWords)
            @Html.ValidationMessageFor(model => model.KeyWords)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TypeId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TypeId)
            @Html.ValidationMessageFor(model => model.TypeId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsRecommend)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsRecommend)
            @Html.ValidationMessageFor(model => model.IsRecommend)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
